import React from 'react'
import { useHistory } from 'react-router-dom'
import { LoginParam } from './datatype'

export default function Login() {
    const history = useHistory<LoginParam>()
    const jumpToHome = () => {
    //    history.push('/', {a: 100})

       history.push({
           pathname: '/',
           state: { a: 100 }
       })
    }
    return (
        <div>
            Login
            <button onClick={jumpToHome}>点我去主页</button>
        </div>
    )
}
